#ifndef REMOTECONTROL_H
#define REMOTECONTROL_H

#include <QObject>

class RemoteControl : public QObject
{
    Q_OBJECT
public:
    explicit RemoteControl(QObject *parent = nullptr);
    const QString proxyPath = "proxy-client-0.1/conf/config.properties";
    const QString proxyStartPath = "proxy-client-0.1/bin/startup.sh";
    const QString proxyStopPath = "proxy-client-0.1/bin/stop.sh";
    QString ipAddress() const;

    Q_INVOKABLE void startupRemoteControl();//开启
    Q_INVOKABLE void stopRemoteControl();//关闭

signals:
    void ipAddressChanged();

private:
    bool updateConfigFile(const QString &clientKey);
    bool startScript();
    bool stopScript();
};

#endif // REMOTECONTROL_H
